import {baseUrl} from "./config.js"
export function toplist()
{
	return uni.request({
		    url: `${baseUrl}/toplist/detail`,
			method:"GET"
		}).then((res)=>{
			return res.data.list.slice(0,4);
		});
}
export function listDetail(listId)
{
	return uni.request({
		    url: `${baseUrl}/playlist/detail?id=${listId}`,
			method:"GET"
	});
}
export function listSong(ids)
{
	return uni.request({
		    url: `${baseUrl}/song/detail?ids=${ids}`,
			method:"GET"
	});
}
export function listSongUrl(songId)
{
	return uni.request({
		    url: `${baseUrl}/song/url?id=${songId}`,
			method:"GET"
	});
}
export function listSongLyric(id)
{
	return uni.request({
		    url: `${baseUrl}/lyric?id=${id}`,
			method:"GET"
	});
}
export function searchHot()
{
	return uni.request({
		 url: `${baseUrl}/search/hot/detail`,
		 method:"GET"
	})
}
export function searchWord(word)
{
	return uni.request({
		 url: `${baseUrl}/search?keywords=${word}`,
		 method:"GET"
	})
}
export function searchSuggest(word)
{
	return uni.request({
		 url: `${baseUrl}/search/suggest?keywords=${word}$type=mobile`,
		 method:"GET"
	})
}